<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>五人行博客</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="lib/jquery.validate.js" type="text/javascript"></script>
<script src="localization/messages_cn.js" charset="UTF-8" type="text/javascript"></script>

<script type="text/javascript">
		$().ready(function() {
			//字母数字
			 jQuery.validator.addMethod("alnum", function(value, element) {
			 return this.optional(element) || /^[a-zA-Z0-9]+$/.test(value);
			 }, "只能包括英文字母和数字");
			 
			$("#myform").validate(
			{
				rules: {
					username: 
						{"required":true,
						"alnum":true
					},
					major: "required"
				}
			}
			)
		});
		</script>
</head>
<body>
<%
Boolean isLogin = (Boolean)session.getAttribute("isLogin");
if(isLogin == null){
	response.sendRedirect("login.html");
}
%>
<img src="img/12.jpg" id="bgimage"></img>
<div id="menu" class="transparent_class">
<span id="menuleft"><a href="welcome.jsp"><%=session.getAttribute("username") %></a>已登录</span>

<span id="menuright"><a href="login.jsp">退出</a>|<a href="register2.html">注册</a></span>
</div>
<center>

<br><br><br><br><br><br><br>
<form action="writeBlogServlet" method="post" id="myform">
<p>
	题&nbsp;&nbsp;&nbsp;&nbsp;目：<input type="text" id="title" name="title" /> 
</p>
<p>
				类&nbsp;&nbsp;&nbsp;&nbsp;别：
				<select id="blogType" name="blogType" style="width:150px;">
					<option value="抒情" >抒情</option>
					<option value="科幻">科幻</option>
					<option value="论文">论文</option>
					<option value="散文">散文</option>
					<option value="网游类">网游类</option>
					<option value="玄幻类">玄幻类</option>
					<option value="军事">军事</option>
					<option value="武侠类">武侠类</option>
					<option value="私密">私密</option>
					<option value="生活">生活</option>
				</select>
				
				
				<br> <br>
				<p>				
<p>正文<br/>
	<textarea id="blogcontent5" name="blogcontent" cols="100" rows="20">
</textarea><br/>
<p>
<br> <input type="submit" value="提交">
</form>

</center>
</body>
</html>
